package model.avonigo.com;

import com.google.appengine.api.datastore.Key;

import java.util.Date;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class User {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;

    @Persistent
    private String firstName;

    @Persistent
    private String lastName;
    
    @Persistent
    private String mail;
    
	@Persistent
    private Date hireDate;
	
	@Persistent
    private String serverName;
	
	@Persistent
    private String serverAdresse;
	
	@Persistent
	private Location location;

    public User(String firstName, String lastName,String mail, Date hireDate, String serverName, String serverAdresse, Location location) {
        this.firstName = firstName;
        this.lastName = lastName;
        this.mail = mail;
        this.hireDate = hireDate;
        this.serverName = serverName;
        this.serverAdresse = serverAdresse;
        this.location = location;
    }

    // Accessors for the fields.  JDO doesn't use these, but your application does.

    public Key getKey() {
        return key;
    }

    public String getFirstName() {
        return firstName;
    }
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }
    
    public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

    public Date getHireDate() {
        return hireDate;
    }
    public void setHireDate(Date hireDate) {
        this.hireDate = hireDate;
    }
    public String getServerName() {
		return serverName;
	}

	public void setServerName(String serverName) {
		this.serverName = serverName;
	}

	public String getServerAdresse() {
		return serverAdresse;
	}

	public void setServerAdresse(String serverAdresse) {
		this.serverAdresse = serverAdresse;
	}
	
	public Location getLocation() {
		return location;
	}

	public void setLocation(Location location) {
		this.location = location;
	}
}